<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,user-scalable=no,maximum-scal=1.0,">
    <title>Document</title>
    <link rel="stylesheet" href="css/normalize.css" .css ">
    <link rel="stylesheet " href="css/index.css ".css">

</head>

<body>
    <div>
        <div class="top"><span>综合</span><span>销量</span><span>价格</span><span>筛选</span></div>
        <div class="main">
            <div class="goods">
                <div>
                    <span class="good"><img src="" alt=""><h5></h5><span class="minprice">88</span><span class="productprice">395</span></span>
                    <span class="good"><img src="" alt=""><h5></h5><span class="minprice"></span><span class="productprice"></span></span>


                </div>
                <div>
                    <span class="good"><img src="" alt=""><h5></h5><span class="minprice"></span><span class="productprice"></span></span>
                    <span class="good"><img src="" alt=""><h5></h5><span class="minprice"></span><span class="productprice"></span></span>


                </div>
            </div>
        </div>
    </div>
    <!-- 注册一个全局的axios对象 -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <script>
        axios.get("https://bksj.jiayonline.com/app/ewei_shopv2_api.php?i=5&r=goods.get_list&page=1&comefrom=wxapp&openid=sns_wa_owc5E5TKGEc7n-8ce2TChTk6XIT4&mid=&merchid=&authkey=&timestamp=1624098616376").then(function(response) {
            console.log(response.data.list);
            goodList = response.data.list;
            console.log(goodList[1].id);
            var img = document.querySelectorAll('img');
            var h5 = document.querySelectorAll('h5');
            var minprice = document.querySelectorAll('.minprice');
            var productprice = document.querySelectorAll('.productprice');
            console.log(img[0]);
            for (var i = 0; i < img.length; i++) {
                console.log(goodList[i].thumb);
                img[i].src = goodList[i].thumb;
                h5[i].innerHTML = goodList[i].title;
                minprice[i].innerHTML = "¥" + goodList[i].minprice + ".00";
                productprice[i].innerHTML = "¥" + goodList[i].productprice;

            }
        })
    </script>


</body>

</html>